Optimal. Leaf size=270 \[ \frac{\sqrt{a+b x+c x^2} \left (64 a^2 (2 c e-3 a g)-120 a b^2 e-4 a b (55 c d-36 a f)+105 b^3 d\right )}{192 a^4 x}-\frac{\tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+b x+c x^2}}\right ) \left (32 a^2 b (3 c e-2 a g)+16 a^2 c (3 c d-4 a f)-24 a b^2 (5 c d-2 a f)-40 a b^3 e+35 b^4 d\right )}{128 a^{9/2}}-\frac{\sqrt{a+b x+c x^2} \left (48 a^2 f-40 a b e-36 a c d+35 b^2 d\right )}{96 a^3 x^2}+\frac{\sqrt{a+b x+c x^2} (7 b d-8 a e)}{24 a^2 x^3}-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.487795, antiderivative size = 270, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.152, Rules used = {1650, 834, 806, 724, 206} \[ \frac{\sqrt{a+b x+c x^2} \left (64 a^2 (2 c e-3 a g)-120 a b^2 e-4 a b (55 c d-36 a f)+105 b^3 d\right )}{192 a^4 x}-\frac{\tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+b x+c x^2}}\right ) \left (32 a^2 b (3 c e-2 a g)+16 a^2 c (3 c d-4 a f)-24 a b^2 (5 c d-2 a f)-40 a b^3 e+35 b^4 d\right )}{128 a^{9/2}}-\frac{\sqrt{a+b x+c x^2} \left (48 a^2 f-40 a b e-36 a c d+35 b^2 d\right )}{96 a^3 x^2}+\frac{\sqrt{a+b x+c x^2} (7 b d-8 a e)}{24 a^2 x^3}-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1650
Rule 834
Rule 806
Rule 724
Rule 206
Rubi steps
\begin{align*} \int \frac{d+e x+f x^2+g x^3}{x^5 \sqrt{a+b x+c x^2}} \, dx &=-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4}-\frac{\int \frac{\frac{1}{2} (7 b d-8 a e)+(3 c d-4 a f) x-4 a g x^2}{x^4 \sqrt{a+b x+c x^2}} \, dx}{4 a}\\ &=-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4}+\frac{(7 b d-8 a e) \sqrt{a+b x+c x^2}}{24 a^2 x^3}+\frac{\int \frac{\frac{1}{4} \left (35 b^2 d-40 a b e-12 a (3 c d-4 a f)\right )+\left (7 b c d-8 a c e+12 a^2 g\right ) x}{x^3 \sqrt{a+b x+c x^2}} \, dx}{12 a^2}\\ &=-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4}+\frac{(7 b d-8 a e) \sqrt{a+b x+c x^2}}{24 a^2 x^3}-\frac{\left (35 b^2 d-36 a c d-40 a b e+48 a^2 f\right ) \sqrt{a+b x+c x^2}}{96 a^3 x^2}-\frac{\int \frac{\frac{1}{8} \left (105 b^3 d-220 a b c d-120 a b^2 e+128 a^2 c e+144 a^2 b f-192 a^3 g\right )+\frac{1}{4} c \left (35 b^2 d-40 a b e-12 a (3 c d-4 a f)\right ) x}{x^2 \sqrt{a+b x+c x^2}} \, dx}{24 a^3}\\ &=-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4}+\frac{(7 b d-8 a e) \sqrt{a+b x+c x^2}}{24 a^2 x^3}-\frac{\left (35 b^2 d-36 a c d-40 a b e+48 a^2 f\right ) \sqrt{a+b x+c x^2}}{96 a^3 x^2}+\frac{\left (105 b^3 d-120 a b^2 e-4 a b (55 c d-36 a f)+64 a^2 (2 c e-3 a g)\right ) \sqrt{a+b x+c x^2}}{192 a^4 x}+\frac{\left (35 b^4 d-40 a b^3 e+16 a^2 c (3 c d-4 a f)-24 a b^2 (5 c d-2 a f)+32 a^2 b (3 c e-2 a g)\right ) \int \frac{1}{x \sqrt{a+b x+c x^2}} \, dx}{128 a^4}\\ &=-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4}+\frac{(7 b d-8 a e) \sqrt{a+b x+c x^2}}{24 a^2 x^3}-\frac{\left (35 b^2 d-36 a c d-40 a b e+48 a^2 f\right ) \sqrt{a+b x+c x^2}}{96 a^3 x^2}+\frac{\left (105 b^3 d-120 a b^2 e-4 a b (55 c d-36 a f)+64 a^2 (2 c e-3 a g)\right ) \sqrt{a+b x+c x^2}}{192 a^4 x}-\frac{\left (35 b^4 d-40 a b^3 e+16 a^2 c (3 c d-4 a f)-24 a b^2 (5 c d-2 a f)+32 a^2 b (3 c e-2 a g)\right ) \operatorname{Subst}\left (\int \frac{1}{4 a-x^2} \, dx,x,\frac{2 a+b x}{\sqrt{a+b x+c x^2}}\right )}{64 a^4}\\ &=-\frac{d \sqrt{a+b x+c x^2}}{4 a x^4}+\frac{(7 b d-8 a e) \sqrt{a+b x+c x^2}}{24 a^2 x^3}-\frac{\left (35 b^2 d-36 a c d-40 a b e+48 a^2 f\right ) \sqrt{a+b x+c x^2}}{96 a^3 x^2}+\frac{\left (105 b^3 d-120 a b^2 e-4 a b (55 c d-36 a f)+64 a^2 (2 c e-3 a g)\right ) \sqrt{a+b x+c x^2}}{192 a^4 x}-\frac{\left (35 b^4 d-40 a b^3 e+16 a^2 c (3 c d-4 a f)-24 a b^2 (5 c d-2 a f)+32 a^2 b (3 c e-2 a g)\right ) \tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+b x+c x^2}}\right )}{128 a^{9/2}}\\ \end{align*}
Mathematica [A] time = 0.555585, size = 212, normalized size = 0.79 \[ \frac{\sqrt{a+x (b+c x)} \left (8 a^2 x (7 b d+2 b x (5 e+9 f x)+c x (9 d+16 e x))-16 a^3 \left (3 d+4 e x+6 x^2 (f+2 g x)\right )-10 a b x^2 (7 b d+12 b e x+22 c d x)+105 b^3 d x^3\right )}{192 a^4 x^4}-\frac{\tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+x (b+c x)}}\right ) \left (32 a^2 b (3 c e-2 a g)+16 a^2 c (3 c d-4 a f)+24 a b^2 (2 a f-5 c d)-40 a b^3 e+35 b^4 d\right )}{128 a^{9/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.061, size = 591, normalized size = 2.2 \begin{align*} -{\frac{e}{3\,a{x}^{3}}\sqrt{c{x}^{2}+bx+a}}+{\frac{5\,be}{12\,{a}^{2}{x}^{2}}\sqrt{c{x}^{2}+bx+a}}-{\frac{5\,{b}^{2}e}{8\,x{a}^{3}}\sqrt{c{x}^{2}+bx+a}}+{\frac{5\,e{b}^{3}}{16}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{7}{2}}}}-{\frac{3\,bce}{4}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{5}{2}}}}+{\frac{2\,ce}{3\,{a}^{2}x}\sqrt{c{x}^{2}+bx+a}}-{\frac{d}{4\,a{x}^{4}}\sqrt{c{x}^{2}+bx+a}}+{\frac{7\,bd}{24\,{a}^{2}{x}^{3}}\sqrt{c{x}^{2}+bx+a}}-{\frac{35\,{b}^{2}d}{96\,{x}^{2}{a}^{3}}\sqrt{c{x}^{2}+bx+a}}+{\frac{35\,{b}^{3}d}{64\,{a}^{4}x}\sqrt{c{x}^{2}+bx+a}}-{\frac{35\,{b}^{4}d}{128}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{9}{2}}}}+{\frac{15\,{b}^{2}cd}{16}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{7}{2}}}}-{\frac{55\,bcd}{48\,x{a}^{3}}\sqrt{c{x}^{2}+bx+a}}+{\frac{3\,cd}{8\,{a}^{2}{x}^{2}}\sqrt{c{x}^{2}+bx+a}}-{\frac{3\,{c}^{2}d}{8}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{5}{2}}}}-{\frac{f}{2\,a{x}^{2}}\sqrt{c{x}^{2}+bx+a}}+{\frac{3\,bf}{4\,{a}^{2}x}\sqrt{c{x}^{2}+bx+a}}-{\frac{3\,{b}^{2}f}{8}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{5}{2}}}}+{\frac{cf}{2}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{3}{2}}}}-{\frac{g}{ax}\sqrt{c{x}^{2}+bx+a}}+{\frac{bg}{2}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){a}^{-{\frac{3}{2}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 42.7422, size = 1216, normalized size = 4.5 \begin{align*} \left [\frac{3 \,{\left (64 \, a^{3} b g -{\left (35 \, b^{4} - 120 \, a b^{2} c + 48 \, a^{2} c^{2}\right )} d + 8 \,{\left (5 \, a b^{3} - 12 \, a^{2} b c\right )} e - 16 \,{\left (3 \, a^{2} b^{2} - 4 \, a^{3} c\right )} f\right )} \sqrt{a} x^{4} \log \left (-\frac{8 \, a b x +{\left (b^{2} + 4 \, a c\right )} x^{2} + 4 \, \sqrt{c x^{2} + b x + a}{\left (b x + 2 \, a\right )} \sqrt{a} + 8 \, a^{2}}{x^{2}}\right ) - 4 \,{\left (48 \, a^{4} d -{\left (144 \, a^{3} b f - 192 \, a^{4} g + 5 \,{\left (21 \, a b^{3} - 44 \, a^{2} b c\right )} d - 8 \,{\left (15 \, a^{2} b^{2} - 16 \, a^{3} c\right )} e\right )} x^{3} - 2 \,{\left (40 \, a^{3} b e - 48 \, a^{4} f -{\left (35 \, a^{2} b^{2} - 36 \, a^{3} c\right )} d\right )} x^{2} - 8 \,{\left (7 \, a^{3} b d - 8 \, a^{4} e\right )} x\right )} \sqrt{c x^{2} + b x + a}}{768 \, a^{5} x^{4}}, -\frac{3 \,{\left (64 \, a^{3} b g -{\left (35 \, b^{4} - 120 \, a b^{2} c + 48 \, a^{2} c^{2}\right )} d + 8 \,{\left (5 \, a b^{3} - 12 \, a^{2} b c\right )} e - 16 \,{\left (3 \, a^{2} b^{2} - 4 \, a^{3} c\right )} f\right )} \sqrt{-a} x^{4} \arctan \left (\frac{\sqrt{c x^{2} + b x + a}{\left (b x + 2 \, a\right )} \sqrt{-a}}{2 \,{\left (a c x^{2} + a b x + a^{2}\right )}}\right ) + 2 \,{\left (48 \, a^{4} d -{\left (144 \, a^{3} b f - 192 \, a^{4} g + 5 \,{\left (21 \, a b^{3} - 44 \, a^{2} b c\right )} d - 8 \,{\left (15 \, a^{2} b^{2} - 16 \, a^{3} c\right )} e\right )} x^{3} - 2 \,{\left (40 \, a^{3} b e - 48 \, a^{4} f -{\left (35 \, a^{2} b^{2} - 36 \, a^{3} c\right )} d\right )} x^{2} - 8 \,{\left (7 \, a^{3} b d - 8 \, a^{4} e\right )} x\right )} \sqrt{c x^{2} + b x + a}}{384 \, a^{5} x^{4}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d + e x + f x^{2} + g x^{3}}{x^{5} \sqrt{a + b x + c x^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.21294, size = 1955, normalized size = 7.24 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]